package org.collab_games.engine.wrappers;

import java.awt.Dimension;
import java.awt.Graphics;

public class Solid {
boolean gravity;
Model model;
double xSpeed, ySpeed, zSpeed;
Vector3 location;
int X = 0, Y = 1, Z = 2;

public Solid(Model model, boolean useGravity, Vector3 location) {
	this.model = model;
	this.gravity = useGravity;
	this.location = location;
}

public void update() {
	if (gravity && !collision(X)){
		ySpeed += 9.8;
	}
	
	location.x += xSpeed;
	location.y += ySpeed;
	location.z += zSpeed;
}

public void draw(Graphics g, double zoom, Dimension viewport) {
	model.draw(g, zoom, location, viewport);
}

public boolean collision(int axis) {
	return gravity;
}
}
